/*
*	Developed by Leonardo Chatain and Pedro Dusso, at Universidade Federal do Rio Grande do Sul, Brasil, 2009/1
*	Source available at glpacman.codeplex.com
*/

#include "Point2D.h"

Point2D::Point2D(void) {
	x = 0;
	y = 0;
}

Point2D::Point2D(float X, float Y) {
	x = X;
	y = Y;
}

Point2D::~Point2D(void)
{
}

float Point2D::getDistanceTo(Point2D other) {
	float sqrX = other.getX() - x;
	sqrX *= sqrX;
	float sqrY = other.getY() - y;
	sqrY *= sqrY;
	return sqrt(sqrX + sqrY);
}